package com.wn.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @ author     ：NST
 * @ date       ：Created in 2022/10/20 17:02
 * @ description：获取时间工具类
 * @ modified By：
 * @ version:
 */

public class CurrentTime {
    public static String getCurrentTime(){
        DateTimeFormatter dateTimeFormatter =DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        return dateTimeFormatter.format(LocalDateTime.now());
    }

    public static String getCurrentTimeString(){
        DateTimeFormatter dateTimeFormatter =DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
        return dateTimeFormatter.format(LocalDateTime.now());
    }
}
